<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="java.io.*,java.util.*" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<div class="header">
	<h1 class="header-logo">
		<a href="${pageContext.request.contextPath}/HomeServlet">网上书城</a>
	</h1>
	<div class="header-body">
		<ul class="header-list">
			<li><a href="${pageContext.request.contextPath}/client/Cart.jsp">购物车</a></li>
			<c:if test="${sessionScope._username != null}">
			<li><a href="${pageContext.request.contextPath}/UserInfoServlet">我的账户</a></li>
			</c:if>
			<c:if test="${sessionScope._username != null}">
			<li><a href="${pageContext.request.contextPath}/OrderListServlet">我的订单</a></li>
			</c:if>
			<c:if test="${sessionScope._username != null}">
			<li><a href="${pageContext.request.contextPath}/CollectionListServlet">我的收藏</a></li>
			</c:if>
			<c:if test="${sessionScope._username != null}">
			<li><a href="${pageContext.request.contextPath}/AddressListServlet">地址管理</a></li>
			</c:if>
			<c:if test="${sessionScope._username != null}">
			<li class="none-border"><a href="${pageContext.request.contextPath}/LogoutServlet">退出登录</a></li>
			</c:if>
			<c:if test="${sessionScope._username == null}">
			<li><a href="${pageContext.request.contextPath}/client/register.jsp">新用户注册</a></li>
			</c:if>
			<c:if test="${sessionScope._username == null}">
			<li class="none-border"><a href="${pageContext.request.contextPath}/client/login.jsp">登录</a></li>
			</c:if>
		</ul>
		<c:if test="${sessionScope._username != null}">
			<p class="username">欢迎您：${sessionScope._username}</p>
		</c:if>
	</div>
</div>